package com.guigu.eduservice.controller;

import com.guigu.common.utils.R;
import com.guigu.eduservice.entity.DetectionReport;
import com.guigu.eduservice.service.DetectionReportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 检测报告表（存储设备检测的结果及结论） 前端控制器
 * </p>
 *
 * @author Xiaosong
 * @since 2025-10-13
 */
@RestController
@RequestMapping("/advertisement/detectionReport")
public class DetectionReportController {
    @Autowired
    private DetectionReportService detectionReportService;
    //检测报告查询
    @GetMapping("/{equipmentId}")
    public R selectDetectionReportById(@PathVariable Long equipmentId){
        DetectionReport detectionReport = detectionReportService.selectDetectionReportById(equipmentId);
        return R.ok().data("detectionReport",detectionReport);
    }

}
